import { Component, OnInit, Input, EventEmitter, Output, Inject } from '@angular/core';
import { MdDialogRef, MdDialogConfig, MD_DIALOG_DATA } from '@angular/material';

@Component({
  selector: 'app-dialog',
  templateUrl: './dialog.component.html',
  styleUrls: ['./dialog.component.css']
})
export class DialogComponent implements OnInit {

  title: string;
  message: string;

  constructor(@Inject(MD_DIALOG_DATA) private data,
    private dialogRef: MdDialogRef<DialogComponent>) {
  }
  ngOnInit() {
    this.title = this.data.title;
    this.message = this.data.message;
  }
  /**
   * 
   * 
   * 
   * @memberof DialogComponent
   */
  ok() {
    this.dialogRef.close(0);
  }
  /**
   * 
   * 
   * 
   * @memberof DialogComponent
   */
  no() {
    this.dialogRef.close(1);
  }
  /**
   * 
   * 
   * 
   * @memberof DialogComponent
   */
  cancel() {
    this.dialogRef.close(2);
  }
}





// WEBPACK FOOTER //
// ./src/app/shared/dialog/dialog.component.ts